// pages/detail/detail.js
const SERVER = require('../../utils/index');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    active: '1',
    id:'',
    currentIndex: 0,
    swiperList: ['https://img2.baidu.com/it/u=3681880960,455182084&fm=26&fmt=auto&gp=0.jpg', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.pconline.com.cn%2Fimages%2Fupload%2Fupc%2Ftx%2Fphotoblog%2F1104%2F11%2Fc2%2F7278725_7278725_1302501879093_mthumb.jpg&refer=http%3A%2F%2Fimg.pconline.com.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1621136242&t=b244e8ab6d2a051e5da25077c5b0d91b']
  },

  /* 跑马灯当前index */
  currentChange(e) {
    this.setData({
      currentIndex: e.detail
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      id:options.id
    })
    console.log(options.id)
    var that=this
    wx.request({//首页数据
      url: '' + SERVER.SERVER_DIMAIN + '/customer/lot/lotDetail', 
      data: {
        lotId:that.data.id
      },
      header: {
        'content-type': 'application/json' 
      },
      method: 'get',
      success: function (res) {
        console.log(res)
     
       
      }
    });
    
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})